package components

import (
	"github.com/go-fuego/fuego/examples/full-app-gourmet/store/types"
)

templ UnitSelector(selectedUnit types.Unit) {
	<select id="unit" name="defaultUnit" class="input" style="min-width: 5rem;">
		for _, unit := range types.UnitValues {
			<option
				value={ string(unit) }
				if unit == selectedUnit {
					selected
				}
			>
				{ string(unit) }
			</option>
		}
	</select>
}
